package com.song.hbasechap_7_dll;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Random;
import java.util.UUID;

import org.apache.commons.io.IOUtils;

public class HDFSData {
	
	
	public static  void  uuidts()
	{
		StringBuffer sb = new StringBuffer();
		Random ran = new Random();
		for(int i = 0 ;i< 100000;i++)
		{
			
			String uuid = UUID.randomUUID().toString();
			
			int id =  ran.nextInt(50000);
			
			long timestap = System.currentTimeMillis();
			int coln = i %5;
			sb.append(uuid+":"+timestap +"\t" +"col:test"+coln+":"+i +"\n");
		}
		
		try {
			FileOutputStream fout = new FileOutputStream(new File("data"));
			IOUtils.write(sb.toString(), fout);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	
	
	public static void main(String[] args) {
		uuidts();
	}
	
	
}
